package com.house.controller;


import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;


/*
* 自动进入异常处理页面的类,告诉用户页面跳转出错了，增强用户体验感
* */
@ControllerAdvice
public class ErrorController {

    @ExceptionHandler
    public String doException(Exception e){
        System.out.println(e.getMessage());
        return "error";
    }
}
